package com.woniuxy.ticketorder.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @ApiModelProperty()用于方法，字段； 表示对model属性的说明或者数据操作更改
 * value–字段说明
 * name–重写属性名字
 * dataType–重写属性类型
 * required–是否必填
 * example–举例说明
 * hidden–隐藏
 */
@ApiModel(value = "com-woniuxy-ticketorder-entity-TicketOrder")
@Data
@TableName(value = "ticket_order")
@NoArgsConstructor
@AllArgsConstructor
public class TicketOrder implements Serializable {
    /**
     *
     */
//    @Null(message = "id必须为null")   //必须为null
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id",example ="1")
    private Integer id;

    /**
     *
     */
//    @Null(message = "订单号必须为null")
    @ApiModelProperty(value = "订单号",example ="123123123123123")
    private String orderno;

    /**
     *
     */
//    @Null(message = "下单时间必须为null")
    @ApiModelProperty(value = "下单时间",example = "2021-02-26")
    private String ordertime;

    /**
     *
     */
    @ApiModelProperty(value = "用户",example = "1")
    private Integer userid;

    /**
     *
     */
    @ApiModelProperty(value = "金额",example = "45")
    private Double money;

    /**
     *使用Date那么前台传时间戳
     */
//    @Null(message = "支付时间必须为null")
    @ApiModelProperty(value = "支付时间",example = "2021-02-26 23:11:59")
    private String paytime;

    /**
     *
     */
    @ApiModelProperty(value = "影院",example = "蜗牛影院")
    private String cinema;

    /**
     *
     */
    @ApiModelProperty(value = "影厅",example = "1号放映厅")
    private String hall;

    /**
     *
     */
    @ApiModelProperty(value = "位置",example = "1排1坐")
    private String seat;

    /**
     *
     */
    @ApiModelProperty(value = "状态")
    private String status;

    private static final long serialVersionUID = 1L;

    /**
     * 不全参数构造器
     * @param orderno
     * @param ordertime
     * @param userid
     * @param money
     * @param paytime
     * @param cinema
     * @param hall
     * @param seat
     * @param status
     */
    public TicketOrder(String orderno, String ordertime, Integer userid, Double money, String paytime, String cinema, String hall, String seat, String status) {
        this.orderno = orderno;
        this.ordertime = ordertime;
        this.userid = userid;
        this.money = money;
        this.paytime = paytime;
        this.cinema = cinema;
        this.hall = hall;
        this.seat = seat;
        this.status = status;
    }
}
